package com.java.ssm.controerll;

import com.java.ssm.entity.Orders;
import com.java.ssm.service.impl.OrderServiceImpl;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * (Orders)表控制层
 *
 * @author makejava
 * @since 2021-01-18 09:57:14
 */
@RestController
@RequestMapping("order/")
public class OrderController {
    /**
     * 服务对象
     */
    @Resource
    private OrderServiceImpl orderService;

    /**
     * 通过主键查询单条数据
     *
     * @return 单条数据
     */
    @RequestMapping("getOrderAll")
    public String getOrderAll(HttpSession session) {
        Orders order = new Orders();
        List<Orders> orders = orderService.queryAll(order);
        session.setAttribute("orderAll",orders);
        return "jsp/warehousing/stock-order";
    }

}